package com.sanyuan.cloud.module.system.controller.app.position.req;

import com.sanyuan.cloud.module.system.annotation.AddGroup;
import com.sanyuan.cloud.module.system.annotation.QueryGroup;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * @Description: PositionReqVO
 * @Author: wuyuwei
 * @Date: 2025/3/28
 */
@Schema(description = "PositionReqVO")
@Data
public class PositionReqVO {

    /**
     * 标点id
     */
    @Schema(description = "标点id")
    private String id;
    /**
     * 标点名称
     */
    @Schema(description = "标点名称")
    @NotBlank(message = "标点名称不能为空", groups = {AddGroup.class})
    private String name;
    /**
     * 经度
     */
    @Schema(description = "经度")
    @NotNull(message = "经度不能为空", groups = {AddGroup.class, QueryGroup.class})
    private Double longitude;
    /**
     * 纬度
     */
    @Schema(description = "纬度")
    @NotNull(message = "纬度不能为空", groups = {AddGroup.class, QueryGroup.class})
    private Double latitude;

    /**
     * 查询范围 KM
     */
    @Schema(description = "查询范围 KM")
    private Double radiusKm;

    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "标点详细地址")
    private String address;

    @Schema(description = "开始日期", example = "2025-04-03")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate startDate;

    @Schema(description = "结束日期", example = "2025-04-04")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDate endDate;
}
